<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Offer Components Management</title>
</head>
<body>
Credit Card sub-types
	<c:if test="${not empty cardTypes }">
		<table>
			<c:forEach items="${cardTypes}" var="eachCardType">
				<tr>
					<td>${eachCardType.cardType }</td>
					<td><a href="/cardType/delete?id=${eachCardType.id }">Delete</a></td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
	<form action="/cardType/add">
		Add new card sub-type<input type="text" name="cardType"></input>
		<input type="submit" value="Submit"></input>
	</form>
	<hr/>
	
Credit card companies
	<c:if test="${not empty cardCompanies }">
		<table>
			<c:forEach items="${cardCompanies}" var="eachCardCompany">
				<tr>
					<td>${eachCardCompany.companyName }</td>
					<td><a href="/companyName/delete?id=${eachCardCompany.id }">Delete</a></td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
	<form action="/companyName/add">
		Add new credit card issuing company<input type="text" name="companyName"></input>
		<input type="submit" value="Submit"></input>
	</form>
	<hr/>
Merchants
	<c:if test="${not empty merchants }">
		<table>
			<c:forEach items="${merchants}" var="eachMerchant">
				<tr>
					<td>${eachMerchant.merchantName }</td>
					<td><a href="/merchant/delete?id=${eachMerchant.id }">Delete</a></td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
	<form action="/merchant/add">
		Add new merchant<input type="text" name="merchantName"></input>
		<input type="submit" value="Submit"></input>
	</form>
	<hr/>
Shopping categories
	<c:if test="${not empty shoppingCategories }">
		<table>
			<c:forEach items="${shoppingCategories}" var="eachShoppingCategory">
				<tr>
					<td>${eachShoppingCategory.shoppingCategory }</td>
					<td><a href="/shoppingCategory/delete?id=${eachShoppingCategory.id }">Delete</a></td>
				</tr>
			</c:forEach>
		</table>
	</c:if>
	<form action="/shoppingCategory/add">
		Add new Shopping Category<input type="text" name="shoppingCategory"></input>
		<input type="submit" value="Submit"></input>
	</form>
	<hr/>
	
</body>
</html>